//
//  YDAuthManager.h
//  IngCard
//
//  Created by kf on 2017/9/6.
//  Copyright © 2017年 IngDan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "YDLinkedInAccount.h"


#define AUTH [YDAuthManager sharedInstance]

typedef enum : NSUInteger {
    YD3rdSignID_LinkedIn = 1,
} YD3rdSignID;


/**
 第三方登录主流程：
 1. 获取第三方accessToken  -- LinkedIN SDK
 2. 校验与相关账号的绑定关系 -- CallBack
 3. 获取详细信息 -- authDetail
 4. 点击确认跳转到主页
 */


@interface YDAuthManager : NSObject
@property(nonatomic, strong) YDLinkedInAccount *linkedInAccount;

+ (instancetype)sharedInstance;

-(void) authCheckBinding:(YD3rdSignID) signID
             accessToken:(NSString *) accessToken
              onComplete:(void (^)(BOOL success, NSString* msg)) onComplete;

-(void) authBindAccount:(YD3rdSignID) signID
            accessToken:(NSString *)accessToken
                 mobile:(NSString *) mobile
             verifyCode:(NSString *) verifyCode
             onComplete:(void (^)(BOOL success, NSString* msg)) onComplete;

-(void) get3rdAccountDetail:(YD3rdSignID) signID
                accessToken:(NSString *) accessToken
                        uid:(NSString *)uid
                 loginToken:(NSString *) loginToken
                 onComplete:(void (^)(BOOL success, NSString* msg)) onComplete;

-(void) authBindingAccountDetail:(YD3rdSignID) signID
                     accessToken:(NSString *) accessToken
                             uid:(NSString *)uid
                      loginToken:(NSString *) loginToken
                      onComplete:(void (^)(BOOL success, NSString* msg)) onComplete;


@end
